<div class="control-group form-horizontal" style="margin: 0 0 0 0;">
    <label class="control-label-small" ><%= lable %></label>
    <p class="icd-element-name controls-text-small"><%= name %></p>
    <div class="controls-small icd-element-input" style="display:none;">
        <input type="text" value= "<%=name%>" class="span3 icd-element-search"  style="background-color: #f7f7f7"  data-provide="typeahead" data-items="10" autocomplete="off">
        <input type="hidden" value="<%=type%>">
        <div class="btn-group">
            <a href="javascript:;" class="btn btn-primary icd-element-input-submit">确定</a>
            <a href="javascript:;" class="btn icd-element-input-cancel">取消</a>
            <% if (hasDelete) { %>
                <a href="javascript:;" class="btn icd-element-input-delete">删除</a>
            <% } %>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(function(){
        $(".icd-element-search").typeahead({
            source:function(query, process)
            {
                $.ajax({
                    url: '/post/search',
                    type: 'POST',
                    data: {},
                    dataType: 'json',
                    async: true,
                    success: function(msg)
                    {
                        process(msg);
                    }
                });
            }
        });
    });
</script>